package com.social.dao;

import com.social.pojo.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserMapper {

    User selectByUsername(String username);

    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    User queryByUsername(String username);

    List<User> selectAlls();

    List<User> selectAll(@Param("page") Integer page, @Param("pageNum") Integer pageNum);

    List<User> selectByUser(@Param("page") Integer page, @Param("pageNum") Integer pageNum);

    Integer selectAllCount();

    Integer selectCount();

    List<User> selectByUserLike(@Param("realName") String realName, @Param("departmentId") String departmentId, @Param("page") Integer page, @Param("pageNum") Integer pageNum);

    Integer selectCountLike(@Param("realName") String realName, @Param("departmentId") String departmentId);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);
}